package com.zhaojindong.ioc.component.register.third;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 * 自定义逻辑返回需要导入的组件
 */
public class MyImportSelector implements ImportSelector {

    // 返回值就是要导入到容器中的组件的全类名
    // AnnotationMetadata 标注@Import 注解的类的所有注解信息
    @Override
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {
        return new String[]{
                "com.zhaojindong.ioc.component.register.third.Selector"};
    }
}